var ImageNavListener = {
  
  stopIsValid: new Boolean(false),
  
  QueryInterface: function(aIID) {
   if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
       aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
       aIID.equals(Components.interfaces.nsISupports))
     return this;
   throw Components.results.NS_NOINTERFACE;
  },

  onStateChange: function(aProgress, aRequest, aFlag, aStatus) {
   return 0;
  },

  onLocationChange: function(aProgress, aRequest, aURI) {
   // This fires when the location bar changes i.e load event is confirmed
   // or when the user switches tabs
   var FETCH = imageNav.ACTION.fetch;
   if(imageNav.move(+1,FETCH)){
		imageNav.move(-1,FETCH);
		imageNav.move(+2,FETCH);
	}
   return 0;
  },

  // For definitions of the remaining functions see XulPlanet.com
  onProgressChange: function() {return 0;},
  onStatusChange: function() {return 0;},
  onSecurityChange: function() {return 0;},
  onLinkIconAvailable: function() {return 0;}
}
